﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Configuration;
using System.Net;
using System.Data;


namespace FONCREAGROINTEGRAL.Reporting.RRHH
{
    public partial class personalgeneral : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
       
        {
            if (!IsPostBack)
            {
                var reportServer = ConfigurationManager.AppSettings["ReportServer"].ToString();
                rptwboletaplanilla .ProcessingMode = ProcessingMode.Remote;
                rptwboletaplanilla.ServerReport.ReportServerUrl = new Uri(reportServer);
                rptwboletaplanilla.ServerReport.ReportPath = "/RRHH/PersonalGeneral";
                //rptwboletaplanilla.ServerReport.ReportServerCredentials.NetworkCredentials
                
                NetworkCredential myCred = new NetworkCredential("UserName", "Password", "DomainName");

                rptwboletaplanilla.ShowPrintButton = true;
                rptwboletaplanilla.ShowParameterPrompts = false;
                rptwboletaplanilla.ServerReport.Refresh(); 
            }
        }
    }
}